<template>
    <van-tabbar v-model="active" active-color="#39be77" route :placeholder="isNeed">
        <van-tabbar-item name="index" icon="notes-o" to="/index">主页</van-tabbar-item>
        <van-tabbar-item name="concernInfo" icon="star-o" to="/concernInfo" >关注</van-tabbar-item>
        <van-tabbar-item name="publish" icon="add-o" to="/publish">发布</van-tabbar-item>
        <van-tabbar-item name="messageList" icon="chat-o" to="/messageList" :badge="user.unReadNum>0?user.unReadNum:''">消息</van-tabbar-item>
        <van-tabbar-item name="my" icon="user-o" to="/my">我的</van-tabbar-item>
    </van-tabbar>
</template>
<script setup lang="ts">
import { ref,computed } from 'vue';
let active = ref('index');
import {userStore} from '@/store/index'
const user=userStore()
let isNeed=computed(()=>{
return active.value!=='publish'?true:false
})

</script>
  
<style lang="less" scoped></style>